package com.es.disped.dao.oj.mapper;

import com.es.disped.dao.oj.model.Privilege;
import com.es.disped.dao.oj.model.PrivilegeExample;
import java.util.List;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

//@CacheNamespace(implementation=(com.es.disped.dao.cache.RedisCache.class),size=512,flushInterval=60000)
public interface PrivilegeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table privilege
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=PrivilegeSqlProvider.class, method="countByExample")
    long countByExample(PrivilegeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table privilege
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @DeleteProvider(type=PrivilegeSqlProvider.class, method="deleteByExample")
    int deleteByExample(PrivilegeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table privilege
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Insert({
        "insert into privilege (user_id, rightstr, ",
        "defunct)",
        "values (#{userId,jdbcType=CHAR}, #{rightstr,jdbcType=CHAR}, ",
        "#{defunct,jdbcType=CHAR})"
    })
    int insert(Privilege record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table privilege
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @InsertProvider(type=PrivilegeSqlProvider.class, method="insertSelective")
    int insertSelective(Privilege record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table privilege
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=PrivilegeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_id", property="userId", jdbcType=JdbcType.CHAR),
        @Result(column="rightstr", property="rightstr", jdbcType=JdbcType.CHAR),
        @Result(column="defunct", property="defunct", jdbcType=JdbcType.CHAR)
    })
    List<Privilege> selectByExample(PrivilegeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table privilege
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=PrivilegeSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Privilege record, @Param("example") PrivilegeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table privilege
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=PrivilegeSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Privilege record, @Param("example") PrivilegeExample example);
}